import request from '@/service';
import { IRequest } from '@/service/type';

export function getPageListData(url: string, queryInfo: any) {
  return request.post<IRequest>({
    url,
    data: queryInfo,
  });
}

// url: /users/id
export function deletePageDataById(url: string) {
  return request.delete<IRequest>({
    url,
  });
}

export function createPageData(url: string, data: any) {
  return request.post<IRequest>({
    url,
    data,
  });
}

export function editPageData(url: string, data: any) {
  return request.patch<IRequest>({
    url,
    data,
  });
}
